#ifndef COLLIDER_H
#define COLLIDER_H

#include "Vertex.h"
#include <vector>
#include "IUpdateEvent.h"
#include "ICollidable.h"
#include "Singleton.h"

class Collider: public Singleton<Collider>, IUpdateEvent {
protected:
	
public:
	static std::vector<ICollidable*> *list;
	void CollideAll();
	virtual void update(double time);
	float CalcImpulse(Vertex c1, Vertex c2, Vertex p, Vertex v1, Vertex v2, Vertex n, float v_angle1, float v_angle2, float m1, float m2, float I1, float I2); 
};


#endif